When wiggle() is called with duration 0, the async easeAsync calls
yield between microtasks, leaving pending operations that remove
transitions on the same property. This becomes a problem when two
setMessage() calls happen in the same call stack (e.g. via
_queuePriorityMessage): the first fires a no-op wiggle(dur:0) and
the second starts the real wiggle(dur:65). When microtasks drain,
the first wiggle's pending easeAsync calls overwrite the second
wiggle's active transition, effectively cancelling the real animation.
Return early when duration is 0, since the animation is a no-op anyway.
Fixes: fdadbb7a5a2 ("animationUtils: Use easeAsync() for wiggle")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/9207
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4209>
* @param {number} params.wiggleCount - the number of times to wiggle the actor
*/
export async function wiggle(actor, params) {
- if (!St.Settings.get().enable_animations)
+ if (!St.Settings.get().enable_animations || params?.duration === 0)
return;
params = Params.parse(params, {